package com.briup.smartcity_group6.service.Impl;

import com.briup.smartcity_group6.bean.basic.BaseLog;
import com.briup.smartcity_group6.dao.basic.BaseLogMapper;
import com.briup.smartcity_group6.dao.ext.BaseLogExtMapper;
import com.briup.smartcity_group6.service.IBaseLogService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class BaseLogServiceImpl implements IBaseLogService {
    @Autowired
    private BaseLogMapper baseLogMapper;
    @Autowired
    private BaseLogExtMapper baseLogExtMapper;
    public PageInfo<BaseLog> pageQuery(int pageNum, int pageSize) {
        //java8写法：
        PageInfo<BaseLog> pageInfo = PageHelper.startPage(pageNum, pageSize, true).doSelectPageInfo(
                () -> baseLogExtMapper.selectAll()
        );
        return pageInfo;
    }

    @Override
    public void addBaseLog(BaseLog baseLog) {

    }


}
